﻿
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google Map</title>
     <script src="http://ditu.google.com/maps?file=api&amp;v=2&amp;key=AIzaSyAkmwamRkF9pG9cRUg6t1GEYt5dMFLuPTI"
             type="text/javascript"></script>
    <script type="text/javascript">
    
    //清华大学经纬度
    //纬度：116.32593512535095
    //经度：40.00362935169808
    var map;
    var latlng;
    var myOptions;
    //var mk1;
    
    function load()
    {
    
        map = new GMap2(document.getElementById("map"));
        map.enableContinuousZoom();
        map.enableScrollWheelZoom();
        map.addControl(new GSmallMapControl());
	    map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(39,116),5);
        //map.setCenter(new GLatLng(-34.397, 150.644),17);



        //map.setMapType(G_SATELLITE_MAP);//�޸ĵ�ͼ���

    }
        
    function clearallmarker()
    {
        map.clearOverlays();
    }
    
    function movemarker(w ,j,i,add,sub)
	{
	
		var point = new GLatLng(w, j);  
		map.setCenter(point,15);
        var mk1=new GMarker(point); 
        GEvent.addListener(mk1, "click", function () 
                                                {  mk1.openInfoWindowHtml(i.toString() + " " + mk1.getPoint().toString() + "<br>" +"入水温度：" + add.toString()+"，出水温度："+sub.toString());}
			              )
	    function viewpoint()
	    {
	         mk1.openInfoWindowHtml(i.toString() + " " + mk1.getPoint().toString() + "<br>" + "入水温度：" + add.toString()+"，出水温度："+sub.toString());
	    }  

       //document.oncontextmenu=new Function("event.returnValue=false;"); 
       //document.onselectstart=new Function("event.returnValue=false;"); 
        
       var p=new GLatLng(w, j);
       //map.clearOverlays();   //删除google map中原有的标记
       
       
       mk1.setPoint(p);

       map.addOverlay(mk1);
       viewpoint();
       
	}
	
    function flyto(weidu,jingdu)
    { 
	    map.panTo(new GLatLng(weidu,jingdu));
	}
	

	
//     function resize()
//     {
//        var w;
//        var h;
//        w=document.body.offsetWidth-43;
//        h=document.body.offsetHeight-34;
//        document.getElementById("map").style.width = w.toString()+"px";
//        document.getElementById("map").style.height = h.toString()+"px";
//     }
    
    </script>
</head>
<body onload="load()">
    <div id="map" style="width: 500px; height: 500px"></div>

</body>
</html>
